package com.atguigu.ai.operator;

import com.atguigu.ai.vo.QueryVo;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

import java.util.List;

public interface AiOperator {

    /**
     * 一次性输出文本问答
     * @param queryVo QueryVo
     * @return
     */
    default String chat(QueryVo queryVo){
        throw new UnsupportedOperationException();
    }

    /**
     * 流式输出文本问答
     *
     * @param model
     * @param queryVo QueryVo
     * @return
     */
    default Flux<String> chatStream(String model, QueryVo queryVo){
        throw new UnsupportedOperationException();
    }

    /**
     * 图像生成，返回url
     * @param queryVo QueryVo
     * @return
     */
    default String imageUrl(QueryVo queryVo){
        throw new UnsupportedOperationException();
    }

    /**
     * 图像生成，返回base64Json
     * @param queryVo QueryVo
     * @return
     */
    default String imageBase64Json(QueryVo queryVo){
        throw new UnsupportedOperationException();
    }

    /**
     * 文本转音频，返回url
     * @param queryVo QueryVo
     * @return
     */
    default String textToAudio(QueryVo queryVo){
        throw new UnsupportedOperationException();
    }

    /**
     * 上传本地知识库
     *
     * @param projectId
     * @param knowledgeId
     * @param content
     * @return
     */
    Boolean upload(Long projectId, Long knowledgeId, String content);

    /**
     * 移除本地知识库
     * @param docId
     * @return
     */
    Boolean remove(String docId);

    /**
     * 响应式聊天
     * @param queryVo
     * @return
     */
    Flux<String> stream(QueryVo queryVo);
}
